<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>

<c-rt:if test="${!empty errMsg}">
<script>
function iframeHeight(){
	$('#iFrame').css('height', iFrame.document.body.clientHeight+60);
	
}
$(function(){
	$('#list').click(function(){
		location.href='/ecadmin/memberMsg/list.do';
	});
	$('#templateList').click(function(){
		location.href='/ecadmin/memberMsg/templateList.do';
	});
});
</script>
<h1>会员通知明细

</h1>
<b><font color="red">${errMsg }</font></b>
<table width="100%"><tr><td>
<div class="f-link"><a href="javascript:;" id="list">会员通知列表</a></div><div class="f-link"><a href="javascript:;" id="templateList">范本列表</a></div>
</td></tr></table>
</c-rt:if>
<c-rt:if test="${empty errMsg}">
<script>
function iframeHeight(){
	$('#iFrame').css('height', iFrame.document.body.clientHeight+60);
	
}
$(function(){
	$('#list').click(function(){
		location.href='/ecadmin/memberMsg/list.do';
	});
	$('#templateList').click(function(){
		location.href='/ecadmin/memberMsg/templateList.do';
	});
});
</script>
${pu:reqSet('template', pu:get('com.yaodian100.ec.membermsg.entity.MemberMsgTemplate', msg.tempId)) }
<h1>会员通知明细

</h1>
<table width="100%"><tr><td>
<div class="f-link"><a href="javascript:;" id="list">会员通知列表</a></div>
<c-rt:if test="${pu:user().groupName=='A-50-100-100'}">
<div class="f-link"><a href="javascript:;" id="templateList">范本列表</a></div>
</c-rt:if>
</td></tr></table>
<table>
<tr>
<td>
<c-rt:if test="${empty msg.success}">
<c-rt:set var="successCount" value="0" scope="request"/>
</c-rt:if>
<c-rt:if test="${!empty msg.success}">
<c-rt:set var="successCount" value="${pu:arrayLength(pu:split(msg.success, ',')) }" scope="request"/>
</c-rt:if>
成功发送${successCount }笔：</td><td>
<textarea rows="2" cols="100" style="height:30px">${msg.success }</textarea>
</td>
</tr>
<tr>
<td>
<c-rt:if test="${empty msg.unsuccess}">
<c-rt:set var="unsuccessCount" value="0" scope="request"/>
</c-rt:if>
<c-rt:if test="${!empty msg.unsuccess}">
<c-rt:set var="unsuccessCount" value="${pu:arrayLength(pu:split(msg.unsuccess, ',')) }" scope="request"/>
</c-rt:if>
未发送${unsuccessCount }笔：</td><td>
<textarea rows="2" cols="100" style="height:30px">${msg.unsuccess }</textarea>
</td>
</tr>
<tr>
<td>发送时间：</td><td>
<fmt-rt:formatDate value="${msg.sendTime}" pattern="yyyy/MM/dd HH:mm"/>
</td>
</tr>
<tr>
<td>发送工具：</td><td>
<c-rt:if test="${msg.sendType=='1'}">系统信</c-rt:if><c-rt:if test="${msg.sendType=='2'}">短信</c-rt:if>
</td>
</tr>
<tr>
<td>接收方：</td><td>
<c-rt:if test="${msg.sendTo=='memberReceiver'}">订购人</c-rt:if><c-rt:if test="${msg.sendTo=='orderReceiver'}">收货人</c-rt:if>
</td>
</tr>
<tr>
<td>信件主旨：</td><td>
${template.subject }
</td>
</tr>
<tr>
<td>发送人：</td><td>
${pu:reqSet('createUser', pu:get('com.yaodian100.core.admin.entity.User', msg.createUser)) }
					${createUser.group.description }-${msg.createUser }
</td>
</tr>
<tr>
<td>范本：</td><td>

</td>
</tr>
</table>
<table width="100%" style="border:1px solid #000; cellspacing:5px;"><tr><td>
<iframe id="iFrame" name="iFrame" src="/ecadmin/memberMsg/preview.do?msgId=${msg.id }" width="100%" height="10" frameborder="0">

</iframe>
</td></tr></table>
</c-rt:if>